<template>
	<div id="title" >
		<h4>{{title}}</h4>
		<p>
			<span>{{text1}}{{value1}}</span>
			<span>{{text2}}{{value2}}</span>
			<span>{{text3}}{{value3}}</span>
		</p>
		<el-button type="primary" class="return-btn"  icon="el-icon-back" @click="back" v-if="isShow">返回</el-button>
	</div>
</template>
<script>
	export default {
		name: "",
		props:['title','text1','value1','text2','value2','text3','value3','isShow'],
		data() {
			return {

			}
		},
		created() {}, // 创建时
		beforeMount() {}, // 挂载之前
		mounted() {}, // 挂载之后
		beforeUpdate() {}, // 数据更新时调用,在渲染之前
		updated() {}, // 数据更新后,渲染后调用(禁止)
		beforeDestroy() {}, // 实例销毁前调用,解绑中间层的数据传输
		destroyed() {}, // 实例销毁后调用
		methods: {
			back(){
				if (this.$route.query.goindex === 'true') {
				this.$router.push('/')
				} else {
					console.log("返回上一页")
					this.$router.back(-1)
				}
			}
		}
	};
</script>
<style lang='scss'>
	#title {
		height: 88px;
		background: #fff;
		text-align: left;
		padding-left: 2%;
		color: #333437;
		position:relative;
		font-size: 14px;
		display: flex;
		flex-direction: column;
		padding: 20px 2%;
		h4{
			font-weight: bold;
			
			font-size: 16px;
		}
		p{
			margin-top: 10px;
			span{
				margin-right: 50px;
			}
		}
		.return-btn{
			position: absolute;
			top:30px;
			right: 20px;
			width: 82px;
			height: 32px;
			line-height: 32px;
			padding: 0;
		}
	}
</style>
